﻿<Window x:Class="InputLanguageWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:l="http://wpfglue.wordpress.com/localization"
    Title="InputLanguageWindow" Height="300" Width="300">
    <!--This example assumes that you have German, English and Arabic installed as input 
    languages on your computer. If you haven't done so, you can do this in the Regional and 
    Language Options in Control Panel-->
    <StackPanel>
        <TextBox x:Name="Text1" l:Localization.KeyboardLanguage="ar"/>
        <TextBox x:Name="Text2"/>
        <RichTextBox l:Localization.TracksKeyboardLanguage="True">
            <RichTextBox.Document>
                <FlowDocument>
                    <Paragraph l:Localization.KeyboardLanguage="de">German</Paragraph>
                    <Paragraph l:Localization.KeyboardLanguage="ar">Arabic</Paragraph>
                    <Paragraph l:Localization.KeyboardLanguage="en">English</Paragraph>
                    <Paragraph>
                        <Run xml:lang="ar-sa">Arabic</Run>
                    </Paragraph>
                    <Paragraph>
                        <Run xml:lang="de-de">German</Run>
                    </Paragraph>
                    <Paragraph>
                        <Run xml:lang="en-gb">English</Run>
                    </Paragraph>
                </FlowDocument>
            </RichTextBox.Document>
        </RichTextBox>
    </StackPanel>
</Window>
